package suery.syntax;

import suery.ComponentTreeNode;
/**
 * '#' in expression means to find the component which name is the string after '#'.
 * @author Jeky
 *
 */
public class SearchByNameParser extends AbstractSearchParser {

    @Override
    protected boolean accept(String token, ComponentTreeNode node) {
        token = token.substring(1);
        return token.equals(node.getComponent().getName());
    }
}
